package com.zzy.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zzy.model.Product;
import com.zzy.service.ProductService;
import com.zzy.service.UserService;

@Controller

public class listProductAction {
	
	
	@Autowired
	ProductService productService;
	
	@RequestMapping("/listProductAction")
	public  String productAction(HttpServletRequest request, HttpServletResponse response,Model model){
		List<Product> list=productService.getList();
		model.addAttribute("list",list);
		
		return "list";
		}
}
